package com.rainng.coursesystem.dao.mapper;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.rainng.coursesystem.model.entity.GeneralReportEntity;
import com.rainng.coursesystem.model.shitong.*;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;
import java.util.Map;

@Repository
public interface GeneralReportMapper {

    List<Map<String,Object>> getGeneralReportDetailsByFatherId(String fid);

    List<GeneralReportEntity> getOneGeneralReportByApplyNum(String applyNum);

    int updateGeneralReportDetailsById(@Param("po")GeneralReportDetailUpdatePo po);

    int updateGeneralReportDetailsByFatherIdAndPrjNum(@Param("po")GeneralReportDetailUpdatePo po,String fatherId,String prjNum);

    int updateGeneralReportById(@Param("po") GeneralReportUpdatePo po);

    int saveGeneralReport(@Param("po")GeneralReportEntity po);

    int saveGeneralReportByTask(@Param("po")GeneralReportEntity po);

    int updateGeneralReportByTask(@Param("po") GeneralReportUpdatePo po);

    List<String> selectPrjNumsByFatherId(String fid);

    int deleteGeneralReportById(String id);

    int deleteGeneralReportDetailByFatherId(String fid);

    IPage<GeneralReportEntity> queryGeneralReport(@Param("po") GeneralReportVo po, Page<GeneralReportEntity> pageParam);

    int countGeneralReport(@Param("po") GeneralReportVo po);

    int countGeneralReportByApplyNum(String applyNum);

    List<Integer> getGeneralReportIdByApplyNum(String applyNum);

    int saveGeneralReportDetail(@Param("po") GeneralReportDetailPo po);


    int updateTaskWithReportByApplyNum(String applyNum);

    List<Map<String,Object>> selectTaskInfoByApplyNum(String applyNum);


    //mode基础模版相关
    List<Map<String,Object>> selectPrjMapByVeType(String veType);


    List<Map<String,Object>> selectGeneralReportModeByVeTpe(String veType);

    List<Map<String, Object>> getGeneralReportPrjNum(String veType);

    List<Map<String, Object>> getGeneralReportAccording(String veType);

    List<Map<String, Object>> getGeneralReportUserange(String veType);
}
